package vmcs.simulationsystem;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

/**
 * Title:        VMCS
 * Description:
 * Copyright:    Copyright (c) 2001
 * Company:      ISS
 * @author Pang Pingli
 * @version 1.0
 */

import java.awt.*;

import vmcs.controller.MaintenanceController;

public class CoinDisplayListener implements ActionListener {

  private MaintenanceController mctrl;

  public CoinDisplayListener(MaintenanceController mc) {
    mctrl = mc;
  }
  public void actionPerformed(ActionEvent e) {
    /**@todo: Implement this java.awt.event.ActionListener method*/

    String   cmd;
    int      idx;
    Button   btn;

    btn = (Button) e.getSource();
    cmd = btn.getActionCommand();
    idx = Integer.parseInt(cmd);

    mctrl.displayCoin(idx);
  }

}